#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
    ll a, b; cin >> a >> b;
    cout << (a ^ b) << endl;
    return 0;
}